home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection 1998 Fall: Game Toolkit / Disc.iso / SDKs / Mac OS USB DDK_v1.0.1 / Mac OS USB DDK Readme < prev    next >
Encoding:
Text File  |  1998-09-03  |  19.3 KB  |  516 lines  |  [ttro/ttxt]

  1.  
  2.  
  3.  
  4.  ***
  5.  ***       Universal Serial Bus(tm) (USB) for the Mac OS
  6.  ***    Mac OS USB 1.0.1 DDK Developer Release Notes
  7.  ***    Copyright 1998 Apple Computer, Inc.
  8.  ***
  9.  
  10.  
  11.  
  12.  Table of Contents:
  13. -------------------------------------------------------------
  14.  Changes from USB v1.0 -> v1.0.1
  15.  USB Fundamentals
  16.  Getting started with Mac OS USB
  17.  Installing the Mac OS USB Software
  18.  Using the Mac OS USB DDK under MPW
  19.  Installing the Mac OS USB DDK into MPW for the First Time  
  20.  Updating a Previously Installed USB DDK for MPW
  21.  Using the Mac OS USB DDK with MetroWerks CodeWarrior
  22.  Installing the Mac OS USB DDK for CodeWarrior for the First Time  
  23.  Updating a Previously Installed Mac OS USB DDK for CodeWarrior
  24.  Using the CodeWarrior Project Files
  25.  Installing the Mac OS USB Components onto your Target System
  26.  Description of Installed Files
  27.  Known Problems
  28.  Contact Information
  29. -------------------------------------------------------------
  30.  
  31. Changes from USB v1.0 -> v1.0.1
  32. -------------------------------
  33.  
  34. Refer to the document "Mac OS USB v1.0.1 Readme" for a description
  35. of the changes between the v1.0 and v1.0.1 DDK.
  36.  
  37. USB Fundamentals
  38. ----------------
  39.  
  40. For the coming generation of Power Macintosh systems, USB is the 
  41. primary interface for connections to low to medium speed peripheral
  42. devices. There a numerous advantages for adopting the USB standard on
  43. Macintosh, and they are discussed in the "Mac OS USB DDK API Reference
  44. Guide". On the future Macintosh systems there will be no ADB, 
  45. Serial Port, or SCSI connections. USB will be the primary port 
  46. for connecting peripheral devices to the Macintosh. 
  47.  
  48. The DDK provides the tools, interfaces, system files, and module 
  49. examples for you to start development of USB products
  50. for the Macintosh. The DDK provides the same release of USB
  51. component software that ships on the introductory release of the
  52. Power Macintosh iMac system.
  53.  
  54. Getting started with Mac OS USB
  55. -----------------------------
  56.  
  57. As of the writing of this note, Power Macintosh Systems which have
  58. USB support built-in, are under development. Seed units for 
  59. Developers are limited and Apple will be unable to provide
  60. developments systems to all developers. To jump-start the 
  61. development process for Mac OS USB, you can obtain a PCI 
  62. USB card from three sources - ADS, OPTi and CMD Technology. 
  63. As other sources for PCI USB cards become available, 
  64. we will revise this readme to include them.
  65.  
  66. For OPTi, the web page is
  67.  
  68.         <http://www.opti.com/html/usbsolutions.html>.
  69.  
  70. For ADS, the web page is
  71.  
  72.   <http://www.adstechnologies.com/>
  73.  
  74. For CMD Technology, Inc, the web page is 
  75.  
  76.         <http://www.cmd.com/>.
  77.  
  78. We advise you to obtain cards from all sources so that you can
  79. test on all cards to ensure maximum compatibility.
  80.  
  81. With these cards, and the supplied software, you can start work on 
  82. developing your USB Modules to support your
  83. devices, along with the associated applications. The DDK provides 
  84. examples for both the MPW and MetroWerks CodeWarrior Pro
  85. environments. Please carefully, read the notes below, on how you 
  86. will need to configure your environment to build the example
  87. modules.
  88.  
  89.  
  90. Installing the Mac OS USB Software
  91. ---------------------------------
  92.  
  93. To install the USB System Software components, drag copy the 
  94. contents of the folder
  95.  
  96. :USBDDK:Extensions-AppleBuilt: 
  97.  
  98. to the Extensions folder, and reboot.
  99.  
  100.  
  101. Important Notes on Installation and Use of this DDK software
  102. ------------------------------------------------------------
  103.  
  104. This DDK will let you look at the sources to some working class 
  105. drivers, build the examples, and develop & build your own code.
  106.  
  107. Please remember that these driver samples are Copyright Apple 
  108. Computer, Inc.. You may use the supplied code to develop Class 
  109. Drivers for your devices. As for publishing the source code, please
  110. check first with the Mac OS USB DDK License agreement, included
  111. in this DDK.
  112.  
  113. The current driver samples may, reflect the latest
  114. state of the art of driver writing for USB in the Mac OS. Note that
  115. the PrinterClassModule sample is for example
  116. purpose only. This sample is the basis for real
  117. drivers under development, however we are unable to provide
  118. the actual class driver code. The remaining examples are the
  119. real code for the Keyboard HID, Mouse HID, Universal HID, and 
  120. Composite class drivers which will ship on the iMac
  121.  
  122. While not extensively tested (by the development team), 
  123. the sample sources have been tweaked slightly to make builds 
  124. under CodeWarrior some what less problematic. The project files 
  125. are provided to help jumpstart your development process.
  126.  
  127.  
  128. Using the Mac OS USB DDK under MPW
  129. ---------------------------------
  130.  
  131. The following are guidelines for using this DDK with the 
  132. MPW programming environment.
  133.  
  134. 1. You must have MPW 3.4.2 (or later) from ETO 23. 
  135.  
  136.    We are not supporting the use of any versions of MPW
  137.    previous to v3.4.2.
  138.    
  139. 2. You must use the Universal Interfaces&Libraries 3.1 from the 
  140.    Apple ftp site. Follow the instructions which are provided
  141.    with the Interfaces&Libraries download to upgrade the 
  142.    MPW programming environment.  The URL for the Developer
  143.    Development Kits web page is
  144.    
  145.    <http://developer.apple.com/sdk/>
  146.    
  147. 3. You should update the USB.h file in the Universal Interfaces 
  148.    CIncludes folder with the USB.h file from the USBDDK 
  149.    Folder.
  150.           
  151. 4. Within MPW, there will be the USBDDK menu.  Choose
  152.    the desired sample module to build from the "Select Example"
  153.    menu item.  Use the "Build Driver or Example" menu item
  154.    to build the example file.  The driver modules which you 
  155.    build will be placed into the "USBDDK:Extensions-DDKBuilt:"
  156.    folder.
  157.  
  158.  
  159. Installing the Mac OS USB DDK into MPW for the First Time
  160. --------------------------------------------------------
  161.  
  162. 1. Drop the UserStartup•USBDDK into your MPW folder.  
  163.  
  164. 2. Ensure that the name of the development system's USB DDK
  165.    folder is USBDDK. The MPW scripts supplied in this DDK 
  166.    will fail if the folder is named differently.
  167.    
  168.    It has been reported that the USBDDK MPW startup script 
  169.    doesn't handle spaces that are part of the complete pathname
  170.    correctly. This should be corrected in a later release.
  171.  
  172. 3. Launch MPW
  173.  
  174.    You'll be prompted to point to  *YOUR* DDK folder.  That is, 
  175.    the USBDDK folder on your hard drive, not a projector 
  176.    database on a server.
  177.  
  178. 4. Drag the "Extensions-AppleBuilt" items into your "target" 
  179.    system's system folder, not the development system's system 
  180.    folder!  The development system only needs the contents of the
  181.    DDK and MPW folders.
  182.  
  183.  
  184. Updating a Previously Installed USB DDK for MPW
  185. ---------------------------------------------------
  186.  
  187. 0. Note the change of name for the DDK from NeptuneDDK to
  188.    USBDDK.
  189.  
  190. 1. Delete the file UserStartup•NeptuneDDK from your MPW folder.
  191.    If this file is left in, MPW will alert you to the fact
  192.    that it was unable to complete execution of a startup
  193.    command.
  194.  
  195. 2. Drop the UserStartup•USBDDK into your MPW folder.  This 
  196.    file may have changed from the last release of the DDK
  197.    
  198. 3. Drag *your* folders from inside the "Drivers" folder 
  199.    from the old DDK to the Driver folder of the new USB DDK 
  200.    folder. Make sure that the name of the folder is changed
  201.    to USBDDK
  202.    
  203. 4. Change the name of the *new* USB DDK folder to match 
  204.    *exactly* what your old USBDDK folder was called.
  205.    
  206. 5. If you don't get the name exactly right, then MPW will ask 
  207.    you to locate the folder the next time you start it.  
  208.    Be warned:  Spaces in the DDK folder name are NOT
  209.    recommended.
  210.    
  211. 6. Start MPW.  Any drivers you've moved from the old DDK to 
  212.    the new DDK's "Drivers" folder will automatically appear 
  213.    in the USBDDK Drivers submenu.
  214.  
  215.  
  216. Using the Mac OS USB DDK with MetroWerks CodeWarrior
  217. ---------------------------------------------------
  218.  
  219. We have supplied MetroWerks CodeWarrior project files for
  220. all of the USB Modules code examples. All of the project
  221. files were created using CodeWarrior Pro 1, IDE 2.0. The 
  222. project files are also compatible with CodeWarrior Pro IDE 
  223. 2.1 and 3.0.
  224.  
  225. For the CodeWarrior IDE environments v2.0 - v3.0, you must use
  226. the Universal Interface & Libraries v3.1. The examples will
  227. not build using the interfaces supplied with the CodeWarrior
  228. v.2 - v3.0 environments. The URL for the Developer Development
  229. Kits web page is
  230.    
  231.    <http://developer.apple.com/sdk/>
  232.  
  233. As mentioned for MPW, it is highly recommend that you use 
  234. one Macintosh for coding purposes and one Mac (aka "Target"
  235. system) for checkout/testing purposes.
  236.  
  237. The supplied project files will place the built drivers
  238. and extensions into the Target folder of the DDK.
  239.  
  240.  
  241. Installing the Mac OS USB DDK for CodeWArrior for the First Time
  242. -----------------------------------------------------------
  243.  
  244. 1. You can place the USBDDK anywhere on your development
  245.    system for the CodeWarrior environment. The access paths
  246.    for the project files are project and compiler relative.
  247.    If you move the examples folders out of the DDK, you must
  248.    fix the access paths so that the sources can be found.
  249.   
  250. 2. Ensure that the CodeWarrior IDE environment has the 
  251.    Universal Interfaces and Libraries 3.1 installed. The
  252.    download file from the DDK website includes instructions
  253.    for upgrading your CodeWarrior environment. Note that if
  254.    you upgrade your interfaces, you will also need to 
  255.    upgrade your precompiled headers. The supplied CodeWarrior
  256.    project files do not use precompiled headers.
  257.  
  258. 3. Copy the USB.h file included in this SDK to the 
  259.    ":Mac OS Support:Headers:Universal Headers:" folder.
  260.  
  261. 4. You will need to create a folder by the name
  262.  
  263.     "USBDDK:Extensions-MCWBuilt"
  264.  
  265.    This is the folder where the CodeWarrior projects will place 
  266.    the built examples. If this folder does not exist, or the folder 
  267.    name is named differently, the class driver samples will be
  268.    created in the CodeWarrior folder.
  269.  
  270. Updating a Previously Installed Mac OS USB DDK for CodeWarrior
  271. -------------------------------------------------------------
  272.  
  273. 0. Note the change of name for the DDK from NeptuneDDK to
  274.    USBDDK.
  275.  
  276. 1. Copy the USB.h file included in this SDK to the 
  277.    ":Mac OS Support:Headers:Universal Headers:" folder. Do not
  278.    use the USB.h header file from an earlier USB DDK with the
  279.    supplied project files, as the examples may not build.
  280.  
  281. 2. If you experience compiler errors with the program samples,
  282.    check whether you have updated the USB.h header in the
  283.    ":Mac OS Support:Headers:Universal Headers:" folder.
  284.  
  285. 3. You will need to create a folder by the name
  286.  
  287.     "USBDDK:Extensions-MCWBuilt"
  288.  
  289.    This is the folder where the CodeWarrior projects will place 
  290.    the built examples. If this folder does not exist, or the folder 
  291.    name is named differently, the class driver samples will be
  292.    created in the CodeWarrior folder.
  293.  
  294. Using the CodeWarrior Project Files
  295. ---------------------------------
  296.  
  297.    For the following samples, there is only a single target for 
  298.    each project:
  299.  
  300.    CompositeClassDriver
  301.    KeyboardModule
  302.    MouseModule
  303.    UniversalModule
  304.  
  305.    For the PrinterClassDriver example, compile the targets in 
  306.    the following order
  307.  
  308.   1. PrinterClassDRVR - creates the 68K DRVR resource
  309.   2. PrintClassDriver - creates the USB PrintClassDriver module
  310.   3. ChooserPack.rsrc - creates the "PACK" resource
  311.   4. USB Chooser Driver - creates the Chooser extension for the 
  312.      USB printer
  313.  
  314. Installing the Mac OS USB Components onto your Target System
  315. -----------------------------------------------------------
  316.  
  317. IMPORTANT NOTE: Do not install the USB Extensions and Libraries
  318. into the System Folder of a CPU that has the USB Support integrated
  319. into the System ROM.
  320.  
  321. 1. Delete any existing files prefixed with "USB" from your system
  322.    folder's extension folder.  This applies only if an earlier 
  323.    pre-release version of Mac OS USB DDK software had been 
  324.    installed.
  325.  
  326. 2. Drag all the files from the 'USBDDK:Extensions-AppleBuilt' 
  327.    folder to the System Folder (ultimately destined for the 
  328.    system folder's extension folder). 
  329.  
  330. 3. Verify that all of the files that you dragged from the 
  331.    'Extensions-AppleBuilt' folder were placed in the system 
  332.    folder's extensions folder.
  333.    
  334.    
  335. Description of Installed Files
  336. --------------------------
  337. Files in the 'Extensions-AppleBuilt' folder:
  338. Files:                  Description:
  339. USBCompositeDriver      A class driver which is loaded for class 0 &
  340.                         and subclass 0 devices (typically keyboards &
  341.                         mice, although a few printers & modems appear 
  342.                         as composite class devices).
  343.                             
  344. USBFamilyExpert         The INIT (actually an 'expt') portion of the Family 
  345.                         Expert. Loaded prior to the INIT parade, it starts 
  346.                         the 'find a USB bus (i.e. UIM driver), loads the
  347.                         hub driver (for the root hub), and starts
  348.                         the hub driver running.  Once running, the
  349.                         hub driver locates devices attached to the
  350.                         port and asks the FamilyExpertLib to load
  351.                         drivers for the devices connected to the
  352.                         hub's ports.
  353.  
  354. USBHubDriver0 &         The Hub driver for the root hub, the Apple USB 
  355. USBHubDriver1           keyboard's hub, and some 3rd party hubs.
  356.  
  357. USBKeyboardModule       The HID Module loaded for a keyboard
  358.                         interface (typically in a compound device)
  359.                             
  360. USBMouseModule          A HID Module loaded for a mouse interface
  361.                         (typically in a compound device).
  362.                             
  363. USBHIDUniversalModule   A HID Module designed to support a number of 3rd
  364.                         party gaming devices via Game Sprockets.
  365.                         Refer to the "Mac OS USB Compatibility Notes"
  366.                         for a description of the game devices supported.
  367.                             
  368. USBOpenHCIDriver        The HAL (Hardware Abstraction Layer), also
  369.                         known as the "UIM" (USB Interface Module).
  370.                         This driver provides an abstracted interface
  371.                         to the OpenHCI host controllers on Mac
  372.                         motherboards and PCI controller cards.
  373.                             
  374. USBPrintDriver          A Printing Class Driver for experimentation
  375.                         purposes.  Printing WILL NOT be functional
  376.                         simply with the addition of this file.  The
  377.                         chooser extension needed for USB printing
  378.                         is still in development and has not yet
  379.                         been released.
  380.     
  381. Known Issues
  382. ------------
  383.  
  384. The following is a list of known issues with this final release
  385. of the USB DDK.
  386.  
  387.   - The Mac OS USB DDK API Reference is close to final. This DDK
  388.     includes draft v15. When the document is final, a copy will be
  389.     placed on the Mac OS USB Developer web page at 
  390.     <http://developer.apple.com/dev/usb/>.
  391.  
  392.   - The Mac OS USB DDK v1.0 does not provide any isochronous
  393.     support. Isochronous support will be implemented in a 
  394.     future release of the Mac OS USB DDK.
  395.  
  396.   - For the USBBulkRead call, the buffer which you pass via the
  397.     usbBuffer field, must be aligned to a "MaxPacketSize" boundary. A
  398.     code snippet is provided in the USB Reference Guide to demonstrate
  399.     how to align a read buffer to a "MaxPacketSize" boundary. Note that
  400.     the buffer can be of any size, but preferably larger than 
  401.     "MaxPacketSize".
  402.  
  403.   - In the PrinterClassDriver sample, you may encounter a compiler
  404.     error while compiling the ChooserPack.rsrc target under CodeWarrior.
  405.     The "declaration syntax error" is reported in the "Chooser.h" file
  406.     regarding the use of the CFragConnectionID symbol. To fix this 
  407.     problem, add the statement
  408.  
  409.     #include <CodeFragments.h>
  410.  
  411.     to the list of included header files at the top of the header 
  412.     listing.
  413.  
  414.   - The USBGetPipeStatusByReference call does not function correctly. 
  415.     The pipe state is not returned in the state parameter. Instead 
  416.     one of these errors is returned:
  417.  
  418.     noErr                 specified pipe is active
  419.     kUSBPipeIdleError     specified pipe is in the idle state
  420.     kUSBPipeStalledError  specified pipe is stalled
  421.  
  422.     In a future release of USB, the USBGetPipeStatusByReference call will
  423.     correctly return the pipe state in the state parameter. Note that the
  424.                 kUSBUnknownPipeErr is a valid response for which the pipe state is
  425.     not returned.
  426.  
  427.   - The USBSetPipeIdleByReference call does not function correctly. The
  428.     following errors are returned, even though the call succeeded.
  429.  
  430.     kUSBIdleStalled    pipe was stalled, pipe is still idled despite error
  431.     kUSBPipeIdleError  pipe was already idle
  432.  
  433.   - The USBSetPipeActiveByReference call does not function correctly. The
  434.     following error is returned, even though the call succeeded.
  435.  
  436.     kUSBPipeIdleError  pipe was previously idle, pipe is still made active
  437.  
  438.   - The USBResetPipeByReference call does not function correctly. If 
  439.     kUSBPipeIdleError error is returned, the pipe may or may not have
  440.     been made active, depending on whether the pipe was previously stalled
  441.     or not. An idle pipe which was not stalled is not affected. An idle
  442.     pipe which was also stalled is made active. 
  443.  
  444.     This kUSBPipeStalledError error is also returned if the pipe was 
  445.     previously idle. The call has succeeded despite the error. 
  446.    
  447.   - In the v1.0 release of the USB Services software, config services will 
  448.     fail for a device whose configuration descriptors consist solely of a    
  449.     configuration descriptor and an interface descriptor (total length 
  450.     18 bytes). Any call which tries to access the configuration descriptor, 
  451.     will return a kUSBNotFound Error. This problem is fixed in later versions.
  452.  
  453.     It is possible to work around this problem in 1.0 by changing the firmware
  454.     of the device if possible. Adding any extra descriptor to the configuration
  455.     descriptors will solve the problem. This addition can be as simple as a 2
  456.     byte dummy descriptor of the form:
  457.  
  458.     Descriptor length: 2
  459.     Descriptor type: Anything (0xFF seems to be suitable).
  460.  
  461.  
  462. Contact Information
  463. -------------------
  464.  
  465.   Mac OS USB DDK Upgrades and latest information:
  466.     
  467.     Check the Developer Development Kits web page for
  468.         upgrades to the Mac OS USB DDK. The web page is
  469.         
  470.         <http://developer.apple.com/sdk/>
  471.  
  472.     For the latest information on Mac OS USB, check the Mac OS USB web page.
  473.     The web page is
  474.  
  475.     <http://usb.apple.com>
  476.  
  477.   For Bug Reports:
  478.  
  479.     To ensure the appropriate data is collected, please use the Bug Reporter  
  480.     to send us your bug reports. The Bug Reporter can be found at: 
  481.  
  482.     <http://developer.apple.com/bugreporter>
  483.  
  484.     When reporting problems, please include the machine configuration, 
  485.     including the vendor of the PCI USB card which you have tested with.
  486.  
  487.   For Technical Questions:
  488.  
  489.     Contact Worldwide Developer with purchased development-level technical 
  490.     support incidents at
  491.  
  492.     dts@apple.com
  493.  
  494.     Technical support incidents are bundled in our Premier and Select 
  495.     Developer programs. For information about joining our programs, 
  496.     please visit our Apple Developer Connection web site at 
  497.  
  498.     http://developer.apple.com/programs. 
  499.  
  500.     If you have never purchased a technical support incident and would like 
  501.     to find out how to do so, please visit the following site: 
  502.  
  503.     http://developer.apple.com/programs/techsupport.html . 
  504.  
  505.     
  506.   Comments, Suggestions and Enhancement Requests
  507.  
  508.     Please send all comments and suggestions regarding the Mac OS USB DDK to
  509.     
  510.     usb@apple.com
  511.  
  512.     All email sent to this address will be read, however, we will not be to
  513.     respond to all of your comments and suggestions.
  514.  
  515.         
  516.